package cn.qiao.mq.consumer;

import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * desc:
 *
 * @author qiao
 * @date 2023年06月07日 22:17
 */
@RocketMQMessageListener(
        topic = "test_topic",
        consumerGroup = "consumer-group-test",
        selectorExpression = "*"
)
@Component
public class DemoConsumer implements RocketMQListener<String> {
    @Override
    public void onMessage(String o) {
        System.out.println("receive message: " + o);
    }
}
